<template>
  <div>
    <div>hooks模块化</div>
    <div class="imgList">
      <img  v-for="item of dogList" :src="item" alt="">
    </div>
    <div>
      <button @click="addDog">addDog</button>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from 'vue'
import useDog from "@/hooks/07useDog"

let { dogList, getDog } = useDog()
function addDog() {
  getDog()
}
</script>

<style lang="scss" scoped>
.imgList { display: flex; }
img { height: 100px; }
</style>